//
//  RelationCollectionViewCell.m
//  WideHelp
//
//  Created by ENERGY on 2018/8/8.
//  Copyright © 2018年 ENERGY. All rights reserved.
//

#import "RelationCollectionViewCell.h"

@interface RelationCollectionViewCell()
@property (nonatomic, strong)UILabel * contentLab;
@property (nonatomic, strong)NSString * moneyNumID;
@property (nonatomic, strong)NSString * moneyType;
@end

@implementation RelationCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.contentView.backgroundColor = getColor(@"f5f5f5");
        [self.contentView addSubview:self.contentLab];
        __weak typeof (self)weakSelf = self;
        [self.contentLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.top.bottom.equalTo(weakSelf.contentView);
        }];
    }return self;
}

- (UILabel *)contentLab{
    if (!_contentLab) {
        _contentLab = [[UILabel alloc] init];
        _contentLab.font = DEF_FontSize_14;
        _contentLab.textColor = [UIColor blackColor];
        _contentLab.textAlignment = NSTextAlignmentCenter;
        _contentLab.backgroundColor = [UIColor clearColor];
        _contentLab.text = @"9元";
    }return _contentLab;
}

- (void)setRechargeModel:(NSDictionary *)rechargeModel{
    _rechargeModel = rechargeModel;
    self.contentLab.text = [NSString stringWithFormat:@"%@元", rechargeModel[@"num"]];
    self.moneyNumID = rechargeModel[@"id"];
    self.moneyType = rechargeModel[@"type"];
}
- (void)setRelationModel:(NSDictionary *)relationModel{
    _relationModel = relationModel;
    self.contentLab.text = relationModel[@"content"];
}
@end
